<!-- Main Column -->
<div id="maincolumn">
<h2 class="main cpwd" id="main-title">New Account</h2>
<!-- Visual help : help tips and "Connected" label -->
  <!-- Create Poll address -->
	   <div style="float:left;width:350px">
  		<?=form_open('newAccount', array('id' => 'newAccount'))?>
        	<dl class="small"><!-- Switch Name -->
              <dt>
                  <label>Account ID</label>                                    
              </dt>
              <dd>
                 <?=form_input(array('name' 		=> 'switch_name',
                                    'id' 			=> 'switch_name',
                                    'class' 		=> 'inputtext w180 title',
									))?>    
              </dd>
          </dl>
          
          <dl class="small"><!-- Switch Name -->
              <dt>
                  <label>Type</label>                                    
              </dt>
              <dd>
                 <?php 
					$type_id['']	= '';
					foreach ($types as $type) :
						$type_id[$type['type_id']]	= $type['type_id'];
					endforeach ;
					
					$js = 'id="type_id" class="select w190"';
					echo form_dropdown('type_id', $type_id, 'ZYXEL', $js);
				?>  
                <span style="color:#FF0000">*</span>  
              </dd>
          </dl>
          
          <dl class="small"><!-- Switch Name -->
              <dt>
                  <label>Account</label>                                    
              </dt>
              <dd id="model">
                 <?php 
					$options_model['']	= '&nbsp;';									
					$js = 'id="model_id2" class="select w190"';
					echo form_dropdown('model_id', $options_model, '', $js);
				?>       
            	<span style="color:#FF0000">*</span>
              </dd>
          </dl>
          <div style="clear:both;height:10px;"></div>
            <!--button save and cancel -->
            <div class="buttons">	
                <input id="bSave1" type="button" class="button yes right mr40" value="<?= lang('pr_button_save') ?>" style="height:30px;width:50px;"/>
          		<input id="bCancel1" type="button" class="button no right" value=" <?= lang('pr_button_cancel') ?>" style="height:30px;width:50px;"/>      	
            </div>
      <?=form_close()?>
</div> <!-- /maincolumn -->

<script type="application/javascript">
/**
	 * Filter account list
	 *
	 */
	$('type_id').addEvent('change', function(e)
	{
		e.stop();
		new Request.HTML({
			url: admin_url + 'pr_tab_account_cl/modelbyid/newAccount',
			method: 'post',
			loadMethod: 'xhr',
			data: $('newAccount'),
			update: $('model'),
			onRequest: function() { MUI.showSpinner(); },
			onFailure: function(xhr) { MUI.hideSpinner();},
			onComplete: function() { MUI.hideSpinner();}
		}).send();
	});
	

</script>

